package demo1;
/**
 * 子弹类
 */
public class Bullet {
    //private int hurt = 10;//子弹的伤害值
    public Bullet(){
    }
//    public Bullet(int hurt){
//        this.hurt = hurt;
//    }
    //子弹击中敌人
    public void hitEnemy(Player enemy){
        int hurt = (int)(Math.random()*15+1);
        enemy.damage(hurt);
    }
}
